package com.tianma315.admin.material.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.tianma315.admin.common.base.CoreService;
import com.tianma315.admin.material.VO.PurchaseAndArrtVO;
import com.tianma315.admin.material.VO.PurchaseAndCheckAttrVO;
import com.tianma315.admin.material.VO.PurchaseVO;
import com.tianma315.admin.material.domain.PurchaseDO;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

/**
 * 
 * <pre>
 * 原材料进库表
 * </pre>
 * <small> 2019-05-25 15:23:18 | Aron</small>
 */
public interface PurchaseService extends CoreService<PurchaseDO> {

    Page<PurchaseVO> getPurchaseVOPage(Integer pageNumber, Integer pageSize, String searchName);

    Boolean addPurchase(PurchaseDO purchaseDO);

    Boolean deletePurchase(Integer id);

    List<PurchaseAndArrtVO> statisticsMaterialAllTable(List<Integer> purchaseId,Date beginDate,Date endDate);

    List<PurchaseAndArrtVO> statisticsMaterialTable(Page page,List<Integer> purchaseIds,Date beginDate,Date endDate);

    HSSFWorkbook exportPurchase();

    void importPurchase(MultipartFile file, Long userId);

    List<PurchaseAndCheckAttrVO> getPurchaseByBatchAndMaterialId(Integer materialId, String batch);
    void insertImg(HttpServletRequest request, PurchaseDO purchaseDO);

    boolean updatePurById(PurchaseDO purchaseDO);
}
